CC=gcc
CXX=g++
LD=gcc
AR=ar
RANLIB=ranlib
CFLAGS=-static -fPIC -fopenmp -std=c++20 -O3 -I. -I.. -Wno-stringop-overread
CXXFLAGS=$(CFLAGS) -fmax-errors=5
LDFLAGS=-s -g -L. -fopenmp
LDLIBS=-lm -lstdc++ -lgomp

OBJS=
OBJS+=GLBBuilder.o

all: libglbbuilder.a libglbbuilder.so

libglbbuilder.a: $(OBJS)
	$(AR) qc $@ $^
	$(RANLIB) $@

libglbbuilder.so: libglbbuilder.a
	$(LD) -shared $(LDFLAGS) $^ -o $@ $(LDLIBS)

clean:
	rm -f *.a *.o *.so
